// custom-tab-bar/index.js
Component({
  /**
   * 组件的初始数据
   */
  data: {
    selected: 0,
    paths: [
      "/pages/home/home",
      "/pages/me/me"
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({ url })
      this.setData({
        selected: data.index
      })
    },

    openPublish(){
      wx.navigateTo({
        url: "/pages/publish/publish",
      })
    }
  },

})
